﻿using UnityEngine;
using System.Collections;
using UnityEngine.Events;
//因为UnityEvent<T0>是抽象类，所以需要声明一个类来继承它
public class TouchOtherEvent:UnityEvent<string>{}

public class UIEvent 
{
	public UnityEvent touchOtherEvent = new UnityEvent();
	public UnityEvent nodeRefreshEvent = new UnityEvent();

	private static UIEvent _instance = null;

	public void AddTouchOtherNoteListener (UnityAction unityAction)
	{
		touchOtherEvent.AddListener (unityAction);
	}

	public void AddNodeRefreshListener (UnityAction unityAction)
	{
		nodeRefreshEvent.AddListener (unityAction);
	} 

	public static UIEvent getInstance()
	{
		if (_instance == null)
			_instance = new UIEvent ();
		return _instance;
	}
}